
import request from '@/utils/request'
import api from './config'
const host = api.apiHost

// 任务列表
export function getTaskList(params) {
  return request({
    url: host + '/task/list',
    method: 'get',
    params
  })
}

// 新增任务
export function addTask(data) {
  return request({
    url: host + '/task/save',
    method: 'post',
    data
  })
}

// 新增任务
export function updateTask(data) {
  return request({
    url: host + '/task/update',
    method: 'post',
    data
  })
}

// 获取任务
export function getTask(params) {
  return request({
    url: host + '/task/detail',
    method: 'get',
    params
  })
}

// 删除任务
export function deleteTask(data) {
  return request({
    url: host + '/task/delete',
    method: 'post',
    data
  })
}

